include ./common.mk

SOURCE=$(wildcard ./*.cc) $(wildcard ./*.c) $(wildcard ./*.S)
HEADER=$(wildcard ./*.h) 
FILES=$(HEADER) $(SOURCE)

LIB=libfevent.so
OBJECTS=fevent_epoll.o

all:$(LIB) test

$(LIB): $(OBJECTS) 
	$(CC) $(ARFLAGS) $(INCLUDE_PATH) $(OBJECTS) -o $@

test:
	make -C ./test

clean:
	make clean -C ./test
	rm -rf *.o
	rm -rf $(LIB)

%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -c $^ -o $@

.PHONY:all test clean
